<template>
  <div>
    <h2>Music组件</h2>
    <div>
      <button @click="$router.push('/home/music/item?id=1&name=周杰伦')">
        周杰伦
      </button>
      <button @click="$router.push('/home/music/item?id=1&name=林俊杰')">
        林俊杰
      </button>
      <button @click="$router.push('/home/music/item?id=1&name=孙燕姿')">
        孙燕姿
      </button>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "Music",
  mounted() {
    console.log("Music 初始化");
  },
  beforeDestroy() {
    console.log("Music 即将卸载");
  },
  activated() {
    console.log("Music 组件激活");
  },
  deactivated() {
    console.log("Music 组件失活");
  },
};
</script>

<style></style>
